extends ../layout

block vars
  - var title = user.username
block content
  .container-fluid.container.mt15
      .row-fluid
        .span9.left
          .user-page
            .profile.container-box
              .ui-header
                a(href='/u/#{user.username}')
                  img.avatar(src="#{user.avatarUrl()}", alt='')
                .username= user.username
                if  user.website
                  .website
                    a(href='#{user.website}')= user.website
                .user-number
                  .number 社区第#{user.reg_id}号成员
                  .since 入住于#{locals.humanDate(user.created_at)}
              .ui-content
                dl
                  dt ID
                  dd= user.username
                if user.nickname
                  dl
                    dt 名号
                    dd= user.nickname
                if user.location
                  dl
                    dt 城市
                    dd= user.location
                if user.company
                  dl
                    dt 公司
                    dd= user.company
                dl
                  dt Email
                  dd= locals.hiddenEmail(user.email)
                if user.twitter
                  dl
                    dt Twitter
                    dd
                      a(href='http://twitter.com/#{user.twitter}') http://twitter.com/#{user.twitter}
                if user.github
                  dl
                    dt Github
                    dd
                      a(href='http://github.com/#{user.github}') http://github.com/#{user.github}
                if user.website
                  dl
                    dt Blog
                    dd
                      a(href='#{user.website}')= user.website
                if user.signature
                  dl
                    dt 签名
                    dd= user.signature
            .topic-lists.container-box.mt10
              .ui-header
                span.title 主题列表
              .ui-content.topics
                for topic in topics
                  - var node = topic.node
                  include ../share/topic
                .ui-footer
                  a(href='/u/#{user.username}/topics') ›› 查看更多主题
            .replies-lists.container-box.mt10
              .ui-header
                span.title 回复列表
              .ui-content.topics
                for reply in replies
                  .reply-item
                    .main
                      span.title
                        | 回复了 #{reply.topic.user.username} 创建的主题  
                        a(href='/topics/#{reply.topic.id}')= reply.topic.title
                      .content
                        p!= reply.content_html
              .ui-footer
                a(href='/u/#{user.username}/replies') ›› 查看更多回复
        .span3.right
          .user-page
            .usercard.container-box
              .ui-content
                .status.status-topic
                  strong
                    a(href='/u/#{user.username}/topics')= user.topic_count
                  | 主题
                .status.status-reply
                  strong
                    a(href='/u/#{user.username}/replies')= user.reply_count
                  | 回复
                .status.status-favorite
                  strong
                    a(href='/u/#{user.username}/favorites')= user.favorite_topics.length
                  | 收藏
                .status.status-reputation
                  strong= user.reputation
                  | 威望
            .self-introduction.container-box.mt10
              .ui-header
                span.title 自我介绍
              .ui-content
                p= user.self_intro
